import service from "./request";
//data
export const getKcgData = (params) => {
  return service({
      url: 'base/basBizPeriod/currentPeriod',
      method: "GET", 
      params ,
  });
};
// 库存管理
export const getKcglList = (data,token) => {
    return service({
        url: '/stock/stkIo/list/101/0?_t=1736488861&isVoided=0&column=createTime&order=desc&field=id,,,billNo,billDate,subject,srcNo,supplierId_dictText,opDept_dictText,operator_dictText,cost,settleAmt,settledAmt,invoicedAmt,invoiceType_dictText,handler_dictText,billStage_dictText,isEffective_dictText,isClosed_dictText,isVoided_dictText,isAuto_dictText,isRubric_dictText,remark,effectiveTime,approver_dictText,createTime,createBy_dictText,sysOrgCode_dictText,updateTime,updateBy_dictText,action',
        method: "GET", 
        params: {
            pageNo:data.pageNo,
            pageSize:data.pageSize,
        } ,     
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};

export const finance = (data, token) => {
    return service({
        url: `/finance/finSalInvoice/list/1/1?_t=${data.te}&isVoided=0&column=createTime&order=desc&field=id,,,billNo,billDate,subject,srcNo,customerId_dictText,invoiceType_dictText,blueInvoiceNo,invoiceNo,invoiceDate,amt,billStage_dictText,isEffective_dictText,isClosed_dictText,isVoided_dictText,isAuto_dictText,isRubric_dictText,remark,effectiveTime,approver_dictText,createTime,createBy_dictText,sysOrgCode_dictText,updateTime,updateBy_dictText,action`,
        method: "GET", 
        
        params: {
            pageNo:data.pageNo,
            pageSize:data.pageSize,
        } ,
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};
// 
export const financeone = (data, token) => {
    return service({
        url: `/finance/finSalInvoice/list/1/0?_t=${data.te}&isVoided=0&column=createTime&order=desc&field=id,,,billNo,billDate,subject,srcNo,customerId_dictText,invoiceType_dictText,blueInvoiceNo,invoiceNo,invoiceDate,amt,billStage_dictText,isEffective_dictText,isClosed_dictText,isVoided_dictText,isAuto_dictText,isRubric_dictText,remark,effectiveTime,approver_dictText,createTime,createBy_dictText,sysOrgCode_dictText,updateTime,updateBy_dictText,action`,
        method: "GET", 
        
        params: {
            pageNo:data.pageNo,
            pageSize:data.pageSize,
        } ,
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};

export const financedele = (data, token) => {
    return service({
        url: `/finance/finSalInvoice/list/1/1?_t=${data.te}&isVoided=0&column=createTime&order=desc&field=id,,,billNo,billDate,subject,srcNo,customerId_dictText,invoiceType_dictText,blueInvoiceNo,invoiceNo,invoiceDate,amt,billStage_dictText,isEffective_dictText,isClosed_dictText,isVoided_dictText,isAuto_dictText,isRubric_dictText,remark,effectiveTime,approver_dictText,createTime,createBy_dictText,sysOrgCode_dictText,updateTime,updateBy_dictText,action`,
        method: "GET", 
        
        params: {
            pageNo:data.pageNo,
            pageSize:data.pageSize,
        } ,
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};

// finance/finPurInvoice/list/0/0?_t=1736556340&isVoided=0&column=createTime&order=desc&field=id,,,billNo,billDate,subject,supplierId_dictText,invoiceType_dictText,invoiceNo,invoiceDate,amt,billStage_dictText,isEffective_dictText,isClosed_dictText,isVoided_dictText,isAuto_dictText,isRubric_dictText,remark,effectiveTime,approver_dictText,createTime,createBy_dictText,sysOrgCode_dictText,updateTime,updateBy_dictText,action

export const cgine = (data,token) => {
    return service({
        url: `/finance/finPurInvoice/list/0/0?_t=${data.te}&isVoided=0&column=createTime&order=desc&field=id,,,billNo,billDate,subject,supplierId_dictText,invoiceType_dictText,invoiceNo,invoiceDate,amt,billStage_dictText,isEffective_dictText,isClosed_dictText,isVoided_dictText,isAuto_dictText,isRubric_dictText,remark,effectiveTime,approver_dictText,createTime,createBy_dictText,sysOrgCode_dictText,updateTime,updateBy_dictText,action`,
        method: "GET", 
        params: {
            pageNo:data.pageNo,
            pageSize:data.pageSize,
        } ,
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};

export const cginehc = (data,token) => {
    return service({
        url: `/finance/finPurInvoice/list/1/0?_t=${data.te}&isVoided=0&column=createTime&order=desc&field=id,,,billNo,billDate,subject,supplierId_dictText,invoiceType_dictText,invoiceNo,invoiceDate,amt,billStage_dictText,isEffective_dictText,isClosed_dictText,isVoided_dictText,isAuto_dictText,isRubric_dictText,remark,effectiveTime,approver_dictText,createTime,createBy_dictText,sysOrgCode_dictText,updateTime,updateBy_dictText,action`,
        method: "GET", 
        
        params: {
            pageNo:data.pageNo,
            pageSize:data.pageSize,
        } ,
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};


export const cginedele = (data, token) => {
    return service({
        url: `/finance/finPurInvoice/list/1/1?_t=${data.te}&isVoided=0&column=createTime&order=desc&field=id,,,billNo,billDate,subject,supplierId_dictText,invoiceType_dictText,invoiceNo,invoiceDate,amt,billStage_dictText,isEffective_dictText,isClosed_dictText,isVoided_dictText,isAuto_dictText,isRubric_dictText,remark,effectiveTime,approver_dictText,createTime,createBy_dictText,sysOrgCode_dictText,updateTime,updateBy_dictText,action`,
        method: "GET", 
        
        params: {
            pageNo:data.pageNo,
            pageSize:data.pageSize,
        } ,
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};

// finance/finSalInvoice/delete
export const cgdele = (data, token) => {
    return service({
        url: `/finance/finSalInvoice/delete?id=`+data,
        method: "DELETE", 
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};
// base/basCustomer/list
export const yh = (data, token) => {
    return service({
        url: `/base/basCustomer/list?`,
        method: "GET", 
        headers: {
            'X-Access-Token': sessionStorage.getItem('token') 
        },
    });
};
